//
//  HYWifiImportTipView.m
//  XPlayer
//
//  Created by liguoqing on 2023/9/14.
//

#import "HYWifiImportTipView.h"

@interface HYWifiImportTipView ()

@property (nonatomic, strong) UIImageView *tipImgView;

@property (nonatomic, strong) UILabel *tipLabel;

@end

@implementation HYWifiImportTipView

- (instancetype)init
{
    self = [super init];
    if(self){
        self.backgroundColor = AppContentBgThemeColor;
        [self addSubview:self.tipLabel];
        [self addSubview:self.tipImgView];
        [self.tipLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerX.equalTo(self).offset(29);
            make.top.mas_equalTo(10);
            make.height.mas_equalTo(24);
        }];
        [self.tipImgView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.right.equalTo(self.tipLabel.mas_left).offset(-5);
            make.centerY.equalTo(self.tipLabel.mas_centerY);
            make.width.height.mas_equalTo(24);
        }];
    }
    return self;
}

- (UIImageView *)tipImgView
{
    if(!_tipImgView){
        _tipImgView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"icon_tip"]];
    }
    return _tipImgView;
}

- (UILabel *)tipLabel
{
    if(!_tipLabel){
        _tipLabel = [[UILabel alloc]init];
        _tipLabel.text = NSLocalizedString(@"在wifi传输文件过程中请不要关闭窗口！", nil);
        _tipLabel.textColor = APPTextThemeColor;
        _tipLabel.font = FONT_SIZE(14);
        _tipLabel.adjustsFontSizeToFitWidth = YES;
    }
    return _tipLabel;
}

@end
